from django.conf.urls import patterns, include, url

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
from PIC_SERVER import settings

admin.autodiscover()

urlpatterns = patterns('',
                       # Examples:
                       # url(r'^$', 'PIC_SERVER.views.home', name='home'),
                       # url(r'^PIC_SERVER/', include('PIC_SERVER.foo.urls')),

                       # Uncomment the admin/doc line below to enable admin documentation:
                       url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

                       # Uncomment the next line to enable the admin:
                       url(r'^admin/', include(admin.site.urls)),

                       # For media files
                       url(r'^media/(?P<path>.*)$', 'django.views.static.serve',
                           {'document_root': settings.MEDIA_ROOT}),

                       url(r"^pic/", include("PIC_SERVER.PIC.url")),

                       url(r"^$", 'PIC_SERVER.views.index', name="index"),
                       url(r"^login/$", 'PIC_SERVER.views.user_login', name="login"),
                       url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, name='auth_logout'),
)
